package com.fifth.order.controller;

import com.fifth.common.pojo.dto.CommonResult;
import com.fifth.order.service.PayLogService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @作者：刘壬杉
 * @创建时间 2022/9/2 9:14
 **/
@RestController
@RequestMapping("order/payLog")
@Api(tags = "支付状态相关接口")
public class PayLogController {
    @Autowired
    private PayLogService payLogService;


    @ApiOperation(value = "校验支付是否成功")
    @ApiImplicitParam(dataType = "String",name = "code",value = "订单编号",required = true)
    @GetMapping("paystatus/{code}")
    public CommonResult payStatus(@PathVariable String code){
        return payLogService.payStatus(code);
    }
}
